package com.mjh.zhujianju.excel;

/**
 * @program: bidding
 * @description:
 * @author: WT1124
 * @create: 2018-08-08 10:01
 **/
public class ColumnProperty {

    private String columnName;
    private String fieldName;
    private ERegExp regExp;

    private ColumnProperty(){}

    private ColumnProperty(ColumnProperty columnProperty){
        this.columnName = columnProperty.columnName;
        this.fieldName = columnProperty.fieldName;
        this.regExp = columnProperty.regExp;
    }

    public String getColumnName() {
        return columnName;
    }

    public String getFieldName() {
        return fieldName;
    }

    public ERegExp getRegExp() {
        return regExp;
    }

    public static class Builder {

        private ColumnProperty target;

        public Builder(){
            target = new ColumnProperty();
        }

        public Builder columnName(String columnName){
            target.columnName = columnName;
            return this;
        }

        public Builder fieldName(String fieldName){
            target.fieldName = fieldName;
            return this;
        }

        public Builder regExp(ERegExp regExp){
            target.regExp = regExp;
            return this;
        }

        public ColumnProperty build() {
            return new ColumnProperty(target);
        }
    }
}
